let request = require("./request-base").default;

request.interceptors.request.use(
  config => {
    // config.timeout = 5000;
    // console.log("这里可以写自定义的request拦截器");
    return config;
  },
  error => {
    // Do something with request error
    // console.log(error); // for debug
    return Promise.reject(error);
  }
);

request.interceptors.response.use(
  response => {
    // console.log("这里可以写自定义的response拦截器");
    return response;
  },
  error => {
    // Do something with request error
    // console.log(error); // for debug
    return Promise.reject(error);
  }
);
export default request;
